/* This is a generated file. Don't edit. Edit the source instead.
 */

#ifndef _hs_cmd_h_
#define _hs_cmd_h_

#include <inttypes.h>
#include "sys_queue.h"
#include <sys/types.h>
#include <sys/time.h>
#include <event.h>
#include "share.h"

typedef struct hs hs_t;
struct hs
{
    int fd;
    struct bufferevent *bufev;
    share_file_list_t *unfinished_list;
    bool finished;
    bool paused;

    int (*cb_add_hash)(hs_t *hs, const char *filename, const char *hash_base32, const char *leaves_base64, double mibs_per_sec);
    int (*cb_fail_hash)(hs_t *hs, const char *filename);
};

hs_t *hs_init(void);

int hs_dispatch_command(const char *line, const char *delimiters,
        int allow_null_elements, hs_t *hs);
#endif
